home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / mint / mntinc20 / vt52.h < prev    next >
C/C++ Source or Header  |  1991-09-27  |  3KB  |  61 lines

  1. /*
  2.  * Include File vt52.h
  3.  *
  4.  * erstellt 26.03.86 von Th. Weinstein
  5.  * ermoeglicht VT52 Escapesequenzen in C Programmen zu verwenden.
  6.  *
  7.  * Verwendung:
  8.  *       printf( HOME ); fflush(stdout);
  9.  * setzt z.B. den Cursor ganz oben in die linke Ecke.
  10.  *       printf( CURS_LOC, 32+12, 32+10 ); fflush(stdout);
  11.  * setzt den Cursor in die 12. Zeile und 10. Spalte.
  12.  *
  13.  * 29.04.90
  14.  * translated to english by F. Ridderbusch
  15.  * enables the usage of VT52 escape sequences in C programms.
  16.  *
  17.  * Usage:
  18.  *    printf( HOME ); fflush(stdout);
  19.  * moves the cursor to the upper left corner.
  20.  *       printf( CURS_LOC, 32+12, 32+10 ); fflush(stdout);
  21.  * moves the cursor to line 12 and column 10.
  22.  *
  23.  */
  24.  
  25. #ifndef _VT52_H
  26. #define _VT52_H
  27.  
  28. #define C_UP            "\033A"       /* cursor one line up               */
  29. #define C_DOWN          "\033B"       /*   "     "    "  down          */
  30. #define C_RIGHT         "\033C"       /*   "     "  column right      */
  31. #define C_LEFT          "\033D"       /*   "     "     "   left          */
  32. #define CLEAR_HOME      "\033E"       /* clear screen, cursor home      */
  33. #define HOME            "\033H"       /* cursor home                      */
  34. #define SCROLL_UP       "\033I"       /* cursor one line up; when already */
  35.                       /* in first line, the entire screen */
  36.                                       /* is scrolled              */
  37. #define CLEAR_DOWN      "\033J"       /* clear screen from cursor position*/
  38.                                       /* to end of screen          */
  39. #define DEL_EOL         "\033K"       /* clear screen until end of line   */
  40. #define INS_LINE        "\033L"       /* insert line              */
  41. #define DEL_LINE        "\033M"       /* delete line              */
  42. #define CURS_LOC        "\033Y%c%c"   /* set cursor to position x, y      */
  43. #define CHAR_COLOR      "\033b%c"     /* select the character color       */
  44.                                       /* Monochrom white= '0', black='1'  */
  45.                                       /* Color 'A' to 'F' depends on      */
  46.                                       /* Resolution              */
  47. #define BG_COLOR        "\033c%c"     /* as above for back ground color   */
  48. #define DEL_BOP        "\033d"          /* erase to start of page inc. cur  */
  49. #define C_ON            "\033e"       /* switch cursor on          */
  50. #define C_OFF           "\033f"       /* switch cursor off          */
  51. #define C_SAVE          "\033j"       /* store cursor position          */
  52. #define C_RESTORE       "\033k"       /* restore cursor position      */
  53. #define ERASE_L         "\033l"       /* erase cursor line          */
  54. #define DEL_BOL         "\033o"       /* erase to beginning of line       */
  55. #define REV_ON          "\033p"       /* inverse on              */
  56. #define REV_OFF         "\033q"       /* inverse off              */
  57. #define WRAP_ON         "\033v"       /* automatic line wrap on          */
  58. #define WRAP_OFF        "\033w"       /* automatic line wrap off      */
  59.  
  60. #endif /* _VT_52_H */
  61.